package com.liner.homework.second;

/**
 * Student类：name，age，className，stuId，构造方法()，study()，sayHi()，playWith(String anotherName)
 */
public class Student {
    private String name;
    private int age;
    private String className;
    private String stuId;
    private String teacherName;
    private int score;

    public Student() {
    }

    public Student(String name, int age, String className, String stuId) {
        this.name = name;
        this.age = age;
        this.className = className;
        this.stuId = stuId;
    }

    public Student(String name, int age, String className, String stuId, String teacherName, int score) {
        this.name = name;
        this.age = age;
        this.className = className;
        this.stuId = stuId;
        this.teacherName = teacherName;
        this.score = score;
    }

    public void info() {
        System.out.println(name + "今年" + age + "岁了,学号是:" + stuId + ",已经" + className + "了,代课老师是:" + teacherName );
    }

    public void study() {
        System.out.println(name + "这次考试考了" + score + "继续努力！！！");
    }

    public void sayHi() {
        System.out.println(this.name + "说了声Hi");
    }

    public void playWith(String anotherName) {
        System.out.println(this.name + "和" + anotherName + "在一块玩耍");
    }

    public String getName() {
        return name;
    }


}
